package com.csdj.sc.middleware.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@Configuration
@ConditionalOnProperty(prefix = "ws.switch",havingValue = "on")
public class WsConfig {

    @Bean
    public ServerEndpointExporter server(){
        return new ServerEndpointExporter();
    }
}
